<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>⚛️Debian系/RedHat系Linux | whoway</title>
    <meta name="description" content="Personal Blog Website">
    <link rel="icon" href="/images/photo.jpg">
  <link rel="manifest" href="/images/photo.jpg">
  <link rel="apple-touch-icon" href="/images/photo.jpg">
  <meta http-quiv="pragma" cotent="no-cache">
  <meta http-quiv="pragma" cotent="no-cache,must-revalidate">
  <meta http-quiv="expires" cotent="0">
    
    <link rel="preload" href="/assets/css/0.styles.0dbae9ec.css" as="style"><link rel="preload" href="/assets/js/app.c70e21ad.js" as="script"><link rel="preload" href="/assets/js/148.cfde1009.js" as="script"><link rel="prefetch" href="/assets/js/10.15222a53.js"><link rel="prefetch" href="/assets/js/100.7e0e5a86.js"><link rel="prefetch" href="/assets/js/101.efd59f25.js"><link rel="prefetch" href="/assets/js/102.dfbdc06c.js"><link rel="prefetch" href="/assets/js/103.d3ab2109.js"><link rel="prefetch" href="/assets/js/104.117957ef.js"><link rel="prefetch" href="/assets/js/105.046e8ff3.js"><link rel="prefetch" href="/assets/js/106.aebdc17d.js"><link rel="prefetch" href="/assets/js/107.248733c2.js"><link rel="prefetch" href="/assets/js/108.a2fecadc.js"><link rel="prefetch" href="/assets/js/109.35196857.js"><link rel="prefetch" href="/assets/js/11.770642f2.js"><link rel="prefetch" href="/assets/js/110.cf3d973c.js"><link rel="prefetch" href="/assets/js/111.f985889a.js"><link rel="prefetch" href="/assets/js/112.ad614f41.js"><link rel="prefetch" href="/assets/js/113.f666653c.js"><link rel="prefetch" href="/assets/js/114.c6c3f384.js"><link rel="prefetch" href="/assets/js/115.e51d3c2f.js"><link rel="prefetch" href="/assets/js/116.4f4b39f5.js"><link rel="prefetch" href="/assets/js/117.99352e11.js"><link rel="prefetch" href="/assets/js/118.c6ae6572.js"><link rel="prefetch" href="/assets/js/119.4ccbe778.js"><link rel="prefetch" href="/assets/js/12.042a92ff.js"><link rel="prefetch" href="/assets/js/120.edda1c4f.js"><link rel="prefetch" href="/assets/js/121.30a638ed.js"><link rel="prefetch" href="/assets/js/122.6efcefb1.js"><link rel="prefetch" href="/assets/js/123.91e6665b.js"><link rel="prefetch" href="/assets/js/124.f27e3d7e.js"><link rel="prefetch" href="/assets/js/125.c75712d5.js"><link rel="prefetch" href="/assets/js/126.ed756cce.js"><link rel="prefetch" href="/assets/js/127.2f06c74c.js"><link rel="prefetch" href="/assets/js/128.d5f6f30e.js"><link rel="prefetch" href="/assets/js/129.508b7eed.js"><link rel="prefetch" href="/assets/js/13.b5280c37.js"><link rel="prefetch" href="/assets/js/130.dc05f9aa.js"><link rel="prefetch" href="/assets/js/131.e0ba69b1.js"><link rel="prefetch" href="/assets/js/132.d79bcaa4.js"><link rel="prefetch" href="/assets/js/133.34acc01a.js"><link rel="prefetch" href="/assets/js/134.dabf64d5.js"><link rel="prefetch" href="/assets/js/135.ad90c915.js"><link rel="prefetch" href="/assets/js/136.dbb0074f.js"><link rel="prefetch" href="/assets/js/137.284ad365.js"><link rel="prefetch" href="/assets/js/138.a4b6856f.js"><link rel="prefetch" href="/assets/js/139.c9c1e20f.js"><link rel="prefetch" href="/assets/js/14.df02ba38.js"><link rel="prefetch" href="/assets/js/140.8b0a9269.js"><link rel="prefetch" href="/assets/js/141.9c7759c5.js"><link rel="prefetch" href="/assets/js/142.a4201a82.js"><link rel="prefetch" href="/assets/js/143.d7da6e8c.js"><link rel="prefetch" href="/assets/js/144.5e48e65d.js"><link rel="prefetch" href="/assets/js/145.a0e2633c.js"><link rel="prefetch" href="/assets/js/146.3c775f9b.js"><link rel="prefetch" href="/assets/js/147.22add89a.js"><link rel="prefetch" href="/assets/js/149.ffc835b5.js"><link rel="prefetch" href="/assets/js/15.fbdfc4ee.js"><link rel="prefetch" href="/assets/js/150.406c4b20.js"><link rel="prefetch" href="/assets/js/151.b2040eea.js"><link rel="prefetch" href="/assets/js/152.7bc65661.js"><link rel="prefetch" href="/assets/js/153.1d7c65e3.js"><link rel="prefetch" href="/assets/js/154.1309de49.js"><link rel="prefetch" href="/assets/js/155.81d3ee1f.js"><link rel="prefetch" href="/assets/js/156.154a4ef2.js"><link rel="prefetch" href="/assets/js/16.e5eb6147.js"><link rel="prefetch" href="/assets/js/17.57853c4a.js"><link rel="prefetch" href="/assets/js/18.cb9d7518.js"><link rel="prefetch" href="/assets/js/19.f354dc47.js"><link rel="prefetch" href="/assets/js/2.570d8a23.js"><link rel="prefetch" href="/assets/js/20.b5af7fad.js"><link rel="prefetch" href="/assets/js/21.0b1928fe.js"><link rel="prefetch" href="/assets/js/22.f78666de.js"><link rel="prefetch" href="/assets/js/23.29c3f366.js"><link rel="prefetch" href="/assets/js/24.6f596516.js"><link rel="prefetch" href="/assets/js/25.14067b60.js"><link rel="prefetch" href="/assets/js/26.74ba4989.js"><link rel="prefetch" href="/assets/js/27.13d60edd.js"><link rel="prefetch" href="/assets/js/28.9523cb32.js"><link rel="prefetch" href="/assets/js/29.8ec842e9.js"><link rel="prefetch" href="/assets/js/3.3fb3d2e0.js"><link rel="prefetch" href="/assets/js/30.805597a8.js"><link rel="prefetch" href="/assets/js/31.831b195d.js"><link rel="prefetch" href="/assets/js/32.063c672d.js"><link rel="prefetch" href="/assets/js/33.6d93fac3.js"><link rel="prefetch" href="/assets/js/34.56e8263c.js"><link rel="prefetch" href="/assets/js/35.dbe688bb.js"><link rel="prefetch" href="/assets/js/36.dc5af2c1.js"><link rel="prefetch" href="/assets/js/37.0a7494f6.js"><link rel="prefetch" href="/assets/js/38.fe4fc171.js"><link rel="prefetch" href="/assets/js/39.f5ed5e92.js"><link rel="prefetch" href="/assets/js/4.2c405ec8.js"><link rel="prefetch" href="/assets/js/40.fe7e2714.js"><link rel="prefetch" href="/assets/js/41.30b0811d.js"><link rel="prefetch" href="/assets/js/42.76f52d62.js"><link rel="prefetch" href="/assets/js/43.e7bb0817.js"><link rel="prefetch" href="/assets/js/44.ead0e883.js"><link rel="prefetch" href="/assets/js/45.235df046.js"><link rel="prefetch" href="/assets/js/46.5f09e829.js"><link rel="prefetch" href="/assets/js/47.67116354.js"><link rel="prefetch" href="/assets/js/48.31f34543.js"><link rel="prefetch" href="/assets/js/49.10b5ebba.js"><link rel="prefetch" href="/assets/js/5.6f47322c.js"><link rel="prefetch" href="/assets/js/50.c0f0b7f1.js"><link rel="prefetch" href="/assets/js/51.5143f3bf.js"><link rel="prefetch" href="/assets/js/52.eeddfd48.js"><link rel="prefetch" href="/assets/js/53.eb790db5.js"><link rel="prefetch" href="/assets/js/54.8fe5421c.js"><link rel="prefetch" href="/assets/js/55.d8f9004b.js"><link rel="prefetch" href="/assets/js/56.62ac9b92.js"><link rel="prefetch" href="/assets/js/57.a9caec0d.js"><link rel="prefetch" href="/assets/js/58.f93fc522.js"><link rel="prefetch" href="/assets/js/59.a81a03aa.js"><link rel="prefetch" href="/assets/js/6.8c2ea393.js"><link rel="prefetch" href="/assets/js/60.ab782775.js"><link rel="prefetch" href="/assets/js/61.6dd12daf.js"><link rel="prefetch" href="/assets/js/62.76f4b01f.js"><link rel="prefetch" href="/assets/js/63.6f8a4742.js"><link rel="prefetch" href="/assets/js/64.6f8bb1fa.js"><link rel="prefetch" href="/assets/js/65.4120a44b.js"><link rel="prefetch" href="/assets/js/66.360c2d2b.js"><link rel="prefetch" href="/assets/js/67.26f84d32.js"><link rel="prefetch" href="/assets/js/68.68f45e5e.js"><link rel="prefetch" href="/assets/js/69.e311eb56.js"><link rel="prefetch" href="/assets/js/7.6762b2d7.js"><link rel="prefetch" href="/assets/js/70.cea82674.js"><link rel="prefetch" href="/assets/js/71.783ddcf7.js"><link rel="prefetch" href="/assets/js/72.e5467385.js"><link rel="prefetch" href="/assets/js/73.b8fb681b.js"><link rel="prefetch" href="/assets/js/74.1bae37db.js"><link rel="prefetch" href="/assets/js/75.024387e5.js"><link rel="prefetch" href="/assets/js/76.a8e53010.js"><link rel="prefetch" href="/assets/js/77.8c55500a.js"><link rel="prefetch" href="/assets/js/78.7ce90bf5.js"><link rel="prefetch" href="/assets/js/79.ef71713f.js"><link rel="prefetch" href="/assets/js/8.788a6364.js"><link rel="prefetch" href="/assets/js/80.acad589d.js"><link rel="prefetch" href="/assets/js/81.02670d10.js"><link rel="prefetch" href="/assets/js/82.53b7b1ac.js"><link rel="prefetch" href="/assets/js/83.99eb8581.js"><link rel="prefetch" href="/assets/js/84.d1535ce3.js"><link rel="prefetch" href="/assets/js/85.fe2b7de9.js"><link rel="prefetch" href="/assets/js/86.41850272.js"><link rel="prefetch" href="/assets/js/87.1cdc6df9.js"><link rel="prefetch" href="/assets/js/88.01bf3461.js"><link rel="prefetch" href="/assets/js/89.17c69819.js"><link rel="prefetch" href="/assets/js/9.3813842d.js"><link rel="prefetch" href="/assets/js/90.f6ae7e35.js"><link rel="prefetch" href="/assets/js/91.507bc284.js"><link rel="prefetch" href="/assets/js/92.90551782.js"><link rel="prefetch" href="/assets/js/93.dc442d78.js"><link rel="prefetch" href="/assets/js/94.315f4e94.js"><link rel="prefetch" href="/assets/js/95.ccd6c6bf.js"><link rel="prefetch" href="/assets/js/96.0c6d89d0.js"><link rel="prefetch" href="/assets/js/97.1a9f10a9.js"><link rel="prefetch" href="/assets/js/98.43be3caa.js"><link rel="prefetch" href="/assets/js/99.54c8207b.js">
    <link rel="stylesheet" href="/assets/css/0.styles.0dbae9ec.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" class="home-link router-link-active"><!----> <span class="site-name">whoway</span></a> <div class="links" style="max-width:nullpx;"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">🎓Coding</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/00.Coding/TheBeautyOfProgramming/" class="nav-link">🔖编程之美题解</a></li><li class="dropdown-item"><!----> <a href="/00.Coding/CodeWarehouse/" class="nav-link">🔖代码意识流</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">🚀语言</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/01.Language/Overview/" class="nav-link">🔖概述</a></li><li class="dropdown-item"><!----> <a href="/01.Language/C/" class="nav-link">⭐️C</a></li><li class="dropdown-item"><!----> <a href="/01.Language/Cpp/" class="nav-link">🚀C++</a></li><li class="dropdown-item"><!----> <a href="/01.Language/Java/" class="nav-link">☕️Java</a></li><li class="dropdown-item"><!----> <a href="/01.Language/Python/" class="nav-link">🧩Python3</a></li></ul></div></div><div class="nav-item"><a href="/02.Hardware/" class="nav-link">✔️硬件基础</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">⭐️软件基础</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/03.Software/01.DataStructureAndAlgorithm/" class="nav-link">🐾数据结构和算法</a></li><li class="dropdown-item"><!----> <a href="/03.Software/02.OS/" class="nav-link">💻操作系统</a></li><li class="dropdown-item"><!----> <a href="/03.Software/03.Net/" class="nav-link">☁️计算机网络</a></li><li class="dropdown-item"><!----> <a href="/03.Software/04.SE/" class="nav-link">✅软件工程</a></li></ul></div></div><div class="nav-item"><a href="/04.Database/" class="nav-link">🎨数据库</a></div><div class="nav-item"><a href="/05.Engineer/" class="nav-link">🔖学术/工程</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">⚙️工具</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/06.Tools/01.employment/" class="nav-link">🔖求职</a></li><li class="dropdown-item"><!----> <a href="/06.Tools/02.efficiency/" class="nav-link">🚀效能</a></li><li class="dropdown-item"><!----> <a href="/06.Tools/03.windows/" class="nav-link">⚙️Windows</a></li><li class="dropdown-item"><!----> <a href="/06.Tools/04.design/" class="nav-link">🧩设计</a></li><li class="dropdown-item"><!----> <a href="/06.Tools/05.linux/" class="nav-link router-link-active">🐉Linux</a></li></ul></div></div><div class="nav-item"><a href="https://github.com/whoway" target="_blank" rel="noopener noreferrer" class="nav-link external">
  GitHub
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <div class="sidebar"><nav class="nav-links"><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">🎓Coding</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/00.Coding/TheBeautyOfProgramming/" class="nav-link">🔖编程之美题解</a></li><li class="dropdown-item"><!----> <a href="/00.Coding/CodeWarehouse/" class="nav-link">🔖代码意识流</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">🚀语言</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/01.Language/Overview/" class="nav-link">🔖概述</a></li><li class="dropdown-item"><!----> <a href="/01.Language/C/" class="nav-link">⭐️C</a></li><li class="dropdown-item"><!----> <a href="/01.Language/Cpp/" class="nav-link">🚀C++</a></li><li class="dropdown-item"><!----> <a href="/01.Language/Java/" class="nav-link">☕️Java</a></li><li class="dropdown-item"><!----> <a href="/01.Language/Python/" class="nav-link">🧩Python3</a></li></ul></div></div><div class="nav-item"><a href="/02.Hardware/" class="nav-link">✔️硬件基础</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">⭐️软件基础</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/03.Software/01.DataStructureAndAlgorithm/" class="nav-link">🐾数据结构和算法</a></li><li class="dropdown-item"><!----> <a href="/03.Software/02.OS/" class="nav-link">💻操作系统</a></li><li class="dropdown-item"><!----> <a href="/03.Software/03.Net/" class="nav-link">☁️计算机网络</a></li><li class="dropdown-item"><!----> <a href="/03.Software/04.SE/" class="nav-link">✅软件工程</a></li></ul></div></div><div class="nav-item"><a href="/04.Database/" class="nav-link">🎨数据库</a></div><div class="nav-item"><a href="/05.Engineer/" class="nav-link">🔖学术/工程</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">⚙️工具</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/06.Tools/01.employment/" class="nav-link">🔖求职</a></li><li class="dropdown-item"><!----> <a href="/06.Tools/02.efficiency/" class="nav-link">🚀效能</a></li><li class="dropdown-item"><!----> <a href="/06.Tools/03.windows/" class="nav-link">⚙️Windows</a></li><li class="dropdown-item"><!----> <a href="/06.Tools/04.design/" class="nav-link">🧩设计</a></li><li class="dropdown-item"><!----> <a href="/06.Tools/05.linux/" class="nav-link router-link-active">🐉Linux</a></li></ul></div></div><div class="nav-item"><a href="https://github.com/whoway" target="_blank" rel="noopener noreferrer" class="nav-link external">
  GitHub
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div> <!----></nav>  <ul class="sidebar-links"><li><div class="sidebar-group first"><p class="sidebar-heading open"><span>⚛️Debian系/RedHat系Linux</span> <!----></p> <ul class="sidebar-group-items"><li><a href="/06.Tools/05.linux/Part02.Redhat%E7%B3%BBLinux.html#⭐️01-公共基础" class="sidebar-link">⭐️01.公共基础</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/06.Tools/05.linux/Part02.Redhat%E7%B3%BBLinux.html#_1-1-换源" class="sidebar-link">1.1.换源</a></li><li class="sidebar-sub-header"><a href="/06.Tools/05.linux/Part02.Redhat%E7%B3%BBLinux.html#_1-2-linux下软件安装方式" class="sidebar-link">1.2.Linux下软件安装方式</a></li><li class="sidebar-sub-header"><a href="/06.Tools/05.linux/Part02.Redhat%E7%B3%BBLinux.html#_1-3-apt和yum对比" class="sidebar-link">1.3.apt和yum对比</a></li><li class="sidebar-sub-header"><a href="/06.Tools/05.linux/Part02.Redhat%E7%B3%BBLinux.html#_1-4-防止普通用户使用sudo-passwd提权" class="sidebar-link">1.4.防止普通用户使用sudo passwd提权</a></li><li class="sidebar-sub-header"><a href="/06.Tools/05.linux/Part02.Redhat%E7%B3%BBLinux.html#_1-5-sudo权限设置" class="sidebar-link">1.5.sudo权限设置</a></li><li class="sidebar-sub-header"><a href="/06.Tools/05.linux/Part02.Redhat%E7%B3%BBLinux.html#_1-6-ssh远程连接到『公网』-腾讯服务器" class="sidebar-link">1.6.ssh远程连接到『公网』  腾讯服务器</a></li></ul></li><li><a href="/06.Tools/05.linux/Part02.Redhat%E7%B3%BBLinux.html#⭐️我的debian系" class="sidebar-link">⭐️我的Debian系</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/06.Tools/05.linux/Part02.Redhat%E7%B3%BBLinux.html#_01-典型种类" class="sidebar-link">01.典型种类</a></li><li class="sidebar-sub-header"><a href="/06.Tools/05.linux/Part02.Redhat%E7%B3%BBLinux.html#_02-简易安装和包" class="sidebar-link">02.简易安装和包</a></li><li class="sidebar-sub-header"><a href="/06.Tools/05.linux/Part02.Redhat%E7%B3%BBLinux.html#_03-区别apt和apt-get" class="sidebar-link">03.区别apt和apt-get</a></li><li class="sidebar-sub-header"><a href="/06.Tools/05.linux/Part02.Redhat%E7%B3%BBLinux.html#_04-linux下装了x切换状态" class="sidebar-link">04.Linux下装了X切换状态</a></li><li class="sidebar-sub-header"><a href="/06.Tools/05.linux/Part02.Redhat%E7%B3%BBLinux.html#_05-2大系统的多用户命令" class="sidebar-link">05.2大系统的多用户命令</a></li><li class="sidebar-sub-header"><a href="/06.Tools/05.linux/Part02.Redhat%E7%B3%BBLinux.html#_1、linux下的命令" class="sidebar-link">1、Linux下的命令</a></li><li class="sidebar-sub-header"><a href="/06.Tools/05.linux/Part02.Redhat%E7%B3%BBLinux.html#_2、windows下的命令" class="sidebar-link">2、Windows下的命令</a></li></ul></li><li><a href="/06.Tools/05.linux/Part02.Redhat%E7%B3%BBLinux.html#八、换源和装pinyin包" class="sidebar-link">八、换源和装pinyin包</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/06.Tools/05.linux/Part02.Redhat%E7%B3%BBLinux.html#（1）-换源，直接放进下面的保存到source-list就行了" class="sidebar-link">（1）.换源，直接放进下面的保存到source.list就行了</a></li><li class="sidebar-sub-header"><a href="/06.Tools/05.linux/Part02.Redhat%E7%B3%BBLinux.html#（2）-『由于网络问题』会导致的问题" class="sidebar-link">（2）.『由于网络问题』会导致的问题</a></li><li class="sidebar-sub-header"><a href="/06.Tools/05.linux/Part02.Redhat%E7%B3%BBLinux.html#（2）由（1）导致的2-想安装『中文』apt-get-install-ibus-ibus-pinyin-也不ok" class="sidebar-link">（2）由（1）导致的2 想安装『中文』apt-get install ibus ibus-pinyin~  也不OK</a></li><li class="sidebar-sub-header"><a href="/06.Tools/05.linux/Part02.Redhat%E7%B3%BBLinux.html#（3）安装完之后的操作" class="sidebar-link">（3）安装完之后的操作</a></li></ul></li><li><a href="/06.Tools/05.linux/Part02.Redhat%E7%B3%BBLinux.html#⭐️我的redhat系" class="sidebar-link">⭐️我的Redhat系</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/06.Tools/05.linux/Part02.Redhat%E7%B3%BBLinux.html#_01-典型种类-2" class="sidebar-link">01.典型种类</a></li><li class="sidebar-sub-header"><a href="/06.Tools/05.linux/Part02.Redhat%E7%B3%BBLinux.html#_02-简易安装和包-2" class="sidebar-link">02.简易安装和包</a></li><li class="sidebar-sub-header"><a href="/06.Tools/05.linux/Part02.Redhat%E7%B3%BBLinux.html#_03-centos的坑" class="sidebar-link">03.CentOS的坑</a></li><li class="sidebar-sub-header"><a href="/06.Tools/05.linux/Part02.Redhat%E7%B3%BBLinux.html#_04-yum『黄狗牌更新器』" class="sidebar-link">04.yum『黄狗牌更新器』</a></li><li class="sidebar-sub-header"><a href="/06.Tools/05.linux/Part02.Redhat%E7%B3%BBLinux.html#_05-光盘镜像" class="sidebar-link">05.光盘镜像</a></li></ul></li><li><a href="/06.Tools/05.linux/Part02.Redhat%E7%B3%BBLinux.html#⭐️对比和使用" class="sidebar-link">⭐️对比和使用</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/06.Tools/05.linux/Part02.Redhat%E7%B3%BBLinux.html#_01-『笔记类』软件安装" class="sidebar-link">01.『笔记类』软件安装</a></li><li class="sidebar-sub-header"><a href="/06.Tools/05.linux/Part02.Redhat%E7%B3%BBLinux.html#_02-deepin下使用『wine』使用windows下的软件" class="sidebar-link">02.Deepin下使用『wine』使用Windows下的软件</a></li><li class="sidebar-sub-header"><a href="/06.Tools/05.linux/Part02.Redhat%E7%B3%BBLinux.html#_03-linux下java环境安装" class="sidebar-link">03.Linux下java环境安装</a></li></ul></li></ul></div></li></ul> </div> <div class="page"> <div class="content"><h1 id="⚛️debian系-redhat系linux"><a href="#⚛️debian系-redhat系linux" class="header-anchor">#</a> ⚛️Debian系/RedHat系Linux</h1> <h2 id="⭐️01-公共基础"><a href="#⭐️01-公共基础" class="header-anchor">#</a> ⭐️01.公共基础</h2> <ul><li>ls是节选自list</li></ul> <h3 id="_1-1-换源"><a href="#_1-1-换源" class="header-anchor">#</a> 1.1.换源</h3> <ul><li>网易开源<a href="http://mirrors.163.com/" target="_blank" rel="noopener noreferrer">镜像站<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li> <li>阿里开源<a href="https://developer.aliyun.com/mirror/" target="_blank" rel="noopener noreferrer">镜像站<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li> <li>腾讯开源<a href="https://mirrors.cloud.tencent.com/help/debian.html" target="_blank" rel="noopener noreferrer">镜像站<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul> <p>常用的换源2021年使用过：参考自<a href="https://developer.aliyun.com/mirror/kali?spm=a2c6h.13651102.0.0.3e221b11eUJT6u" target="_blank" rel="noopener noreferrer">阿里的配置教学<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></p> <ul><li>下面的源，我在2021年上半年配置过，OK</li></ul> <div class="language-txt line-numbers-mode"><pre class="language-text"><code>#阿里云
deb http://mirrors.aliyun.com/kali kali-rolling main non-free contrib
deb-src http://mirrors.aliyun.com/kali kali-rolling main non-free contrib
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br></div></div><h3 id="_1-2-linux下软件安装方式"><a href="#_1-2-linux下软件安装方式" class="header-anchor">#</a> 1.2.Linux下软件安装方式</h3> <ul><li><p>工欲善其事，必先利其器</p></li> <li><p>软件安装还是很重要的</p></li> <li><p>Tallball（我们常说的源码包）</p></li></ul> <blockquote><p>借助configue和make使用</p></blockquote> <ul><li>rpm/deb包（已经针对各个系统编译好的包）</li></ul> <blockquote><p>1、rpm/deb下载后，借助命令行安装</p> <ul><li>这些包来源、网上下载，比如QQ</li> <li>还有来自你的ISO镜像</li></ul> <p>2、rpm借助yum管理，deb借助apt管理</p></blockquote> <ul><li>二进制包（类似于Windows下1步步，下去）</li></ul> <h3 id="_1-3-apt和yum对比"><a href="#_1-3-apt和yum对比" class="header-anchor">#</a> 1.3.apt和yum对比</h3> <ul><li>电脑博物馆</li> <li>Linux中常用的命令<a href="https://www.zhihu.com/question/49073893/answer/114986798" target="_blank" rel="noopener noreferrer">都是哪些单词的缩写？知乎<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul> <p><a href="https://mp.weixin.qq.com/s?src=11&timestamp=1612163791&ver=2863&signature=Qn8v2HlaquU2nSYDePtwkfgfiUkatAyO1UNbxtZh-mGLVZ6t7oGQGb6TbrEeTk-Atw1cE3SHE-8xzpGDhjkAChXZupR5xX0FRa6iy6ITyMZqwieAmWFlDrhPCHOpnF02&new=1" target="_blank" rel="noopener noreferrer">浅谈Linux下dpkg、apt-get、yum和rpm命令的区别<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></p> <ul><li>dpkg是Debian Package 的简写。</li></ul> <table><thead><tr><th></th> <th>Redhat系列</th> <th>Debian系列</th></tr></thead> <tbody><tr><td>安装包格式</td> <td>rpm</td> <td>deb</td></tr> <tr><td>安装包<strong>命令</strong></td> <td>rpm -ivh 安装包.rpm</td> <td>dpkg -i 安装包.deb</td></tr> <tr><td>包管理工具</td> <td>yum</td> <td>apt-get</td></tr> <tr><td>是否支持tar包</td> <td>是</td> <td>是</td></tr></tbody></table> <h3 id="_1-4-防止普通用户使用sudo-passwd提权"><a href="#_1-4-防止普通用户使用sudo-passwd提权" class="header-anchor">#</a> 1.4.防止普通用户使用sudo passwd提权</h3> <ul><li><p>由于安装的时候，没让我们给root设置密码。</p></li> <li><p>导致，我们只能用普通用户。</p></li> <li><p>然后我们想要</p></li> <li><div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token function">su</span> root
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div></li> <li><p>都没有进去，就算直接回车，『因为没有密码状况下的root是不会让你登录的』</p></li></ul> <p><strong>（1）核心的只要1条代码</strong></p> <p>这个时候，需要在普通用户下面，修改root密码。方法如下：</p> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token function">sudo</span> <span class="token function">passwd</span> root
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>然后就可以设置密码了！！</p> <p>然后你就可以进去root了！！</p> <ul><li>如果权限过高，就能用下面的sudo将root密码修改</li></ul> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token function">sudo</span> <span class="token function">passwd</span> root
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><ul><li>防止<a href="https://blog.51cto.com/4554480/1002123" target="_blank" rel="noopener noreferrer">权限过大<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul> <p><strong>（2）如果你想设置只有某些命令可以sudo的话</strong></p> <div class="language-txt line-numbers-mode"><pre class="language-text"><code>如果想免除密码输入，加上参数NOPASSWD:
在root    ALL=(ALL)       ALL下

添加如下内容

test    ALL=(ALL)       ALL

想免除密码输入加上NOPASSWD: 

test    ALL=(ALL)      NOPASSWD: ALL

保存并退出
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br></div></div><div class="language-bash line-numbers-mode"><pre class="language-bash"><code>fog  <span class="token assign-left variable">ALL</span><span class="token operator">=</span> <span class="token punctuation">(</span>root<span class="token punctuation">)</span> NOPASSWD: /sbin/mount, <span class="token punctuation">(</span>root<span class="token punctuation">)</span> NOPASSWD: /bin/umount, <span class="token punctuation">(</span>root<span class="token punctuation">)</span> NOPASSWD: /mnt/mount, <span class="token punctuation">(</span>root<span class="token punctuation">)</span> NOPASSWD: /bin/rm, <span class="token punctuation">(</span>root<span class="token punctuation">)</span> NOPASSWD: /usr/bin/make, <span class="token punctuation">(</span>root<span class="token punctuation">)</span> NOPASSWD: /bin/ln, <span class="token punctuation">(</span>root<span class="token punctuation">)</span> NOPASSWD: /bin/sh, <span class="token punctuation">(</span>root<span class="token punctuation">)</span> NOPASSWD: /bin/mv, <span class="token punctuation">(</span>root<span class="token punctuation">)</span> NOPASSWD: /bin/chown, <span class="token punctuation">(</span>root<span class="token punctuation">)</span> NOPASSWD: /bin/chgrp, <span class="token punctuation">(</span>root<span class="token punctuation">)</span> NOPASSWD: /bin/cp, <span class="token punctuation">(</span>root<span class="token punctuation">)</span> NOPASSWD: /bin/chmod
fog <span class="token assign-left variable">ALL</span><span class="token operator">=</span><span class="token punctuation">(</span>root<span class="token punctuation">)</span> NOPASSWD:
/sbin/mount,
/bin/umount,
/mnt/mount,
/bin/rm,
/usr/bin/make,
/bin/ln, 
/bin/mv, 
/bin/chown, 
/bin/chgrp,
/bin/cp,
/bin/chmod,
/bin/sh
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br></div></div><p><strong>一般用下面得得这个格式就行</strong></p> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>qwer <span class="token assign-left variable">ALL</span><span class="token operator">=</span><span class="token punctuation">(</span>root<span class="token punctuation">)</span> NOPASSWD: /usr/sbin/lsof,/usr/sbin/dmidecode,/bin/kill,/usr/bin/killall,/usr/bin/rsync,ALL
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><ul><li><p>上面就控制了权限</p></li> <li><div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token punctuation">[</span>fog@VM-0-14-centos root<span class="token punctuation">]</span>$ <span class="token function">sudo</span> <span class="token function">passwd</span> root 
<span class="token operator">&gt;&gt;</span><span class="token operator">&gt;</span> /etc/sudoers: 语法错误 near line <span class="token number">101</span> <span class="token operator">&lt;&lt;&lt;</span>
<span class="token operator">&gt;&gt;</span><span class="token operator">&gt;</span> /etc/sudoers: 语法错误 near line <span class="token number">102</span> <span class="token operator">&lt;&lt;&lt;</span>
<span class="token operator">&gt;&gt;</span><span class="token operator">&gt;</span> /etc/sudoers: 语法错误 near line <span class="token number">103</span> <span class="token operator">&lt;&lt;&lt;</span>
<span class="token operator">&gt;&gt;</span><span class="token operator">&gt;</span> /etc/sudoers: 语法错误 near line <span class="token number">104</span> <span class="token operator">&lt;&lt;&lt;</span>
<span class="token operator">&gt;&gt;</span><span class="token operator">&gt;</span> /etc/sudoers: 语法错误 near line <span class="token number">105</span> <span class="token operator">&lt;&lt;&lt;</span>
<span class="token operator">&gt;&gt;</span><span class="token operator">&gt;</span> /etc/sudoers: 语法错误 near line <span class="token number">106</span> <span class="token operator">&lt;&lt;&lt;</span>
<span class="token operator">&gt;&gt;</span><span class="token operator">&gt;</span> /etc/sudoers: 语法错误 near line <span class="token number">107</span> <span class="token operator">&lt;&lt;&lt;</span>
<span class="token operator">&gt;&gt;</span><span class="token operator">&gt;</span> /etc/sudoers: 语法错误 near line <span class="token number">108</span> <span class="token operator">&lt;&lt;&lt;</span>
<span class="token operator">&gt;&gt;</span><span class="token operator">&gt;</span> /etc/sudoers: 语法错误 near line <span class="token number">109</span> <span class="token operator">&lt;&lt;&lt;</span>
<span class="token operator">&gt;&gt;</span><span class="token operator">&gt;</span> /etc/sudoers: 语法错误 near line <span class="token number">110</span> <span class="token operator">&lt;&lt;&lt;</span>
<span class="token operator">&gt;&gt;</span><span class="token operator">&gt;</span> /etc/sudoers: 语法错误 near line <span class="token number">111</span> <span class="token operator">&lt;&lt;&lt;</span>
<span class="token operator">&gt;&gt;</span><span class="token operator">&gt;</span> /etc/sudoers: 语法错误 near line <span class="token number">112</span> <span class="token operator">&lt;&lt;&lt;</span>
<span class="token operator">&gt;&gt;</span><span class="token operator">&gt;</span> /etc/sudoers: 语法错误 near line <span class="token number">113</span> <span class="token operator">&lt;&lt;&lt;</span>
<span class="token operator">&gt;&gt;</span><span class="token operator">&gt;</span> /etc/sudoers: 语法错误 near line <span class="token number">114</span> <span class="token operator">&lt;&lt;&lt;</span>
<span class="token operator">&gt;&gt;</span><span class="token operator">&gt;</span> /etc/sudoers: 语法错误 near line <span class="token number">115</span> <span class="token operator">&lt;&lt;&lt;</span>
<span class="token operator">&gt;&gt;</span><span class="token operator">&gt;</span> /etc/sudoers: 语法错误 near line <span class="token number">116</span> <span class="token operator">&lt;&lt;&lt;</span>
<span class="token operator">&gt;&gt;</span><span class="token operator">&gt;</span> /etc/sudoers: 语法错误 near line <span class="token number">117</span> <span class="token operator">&lt;&lt;&lt;</span>
<span class="token operator">&gt;&gt;</span><span class="token operator">&gt;</span> /etc/sudoers: 语法错误 near line <span class="token number">118</span> <span class="token operator">&lt;&lt;&lt;</span>
<span class="token operator">&gt;&gt;</span><span class="token operator">&gt;</span> /etc/sudoers: 语法错误 near line <span class="token number">119</span> <span class="token operator">&lt;&lt;&lt;</span>
<span class="token operator">&gt;&gt;</span><span class="token operator">&gt;</span> /etc/sudoers: 语法错误 near line <span class="token number">120</span> <span class="token operator">&lt;&lt;&lt;</span>
<span class="token operator">&gt;&gt;</span><span class="token operator">&gt;</span> /etc/sudoers: 语法错误 near line <span class="token number">121</span> <span class="token operator">&lt;&lt;&lt;</span>
<span class="token operator">&gt;&gt;</span><span class="token operator">&gt;</span> /etc/sudoers: 语法错误 near line <span class="token number">122</span> <span class="token operator">&lt;&lt;&lt;</span>
<span class="token operator">&gt;&gt;</span><span class="token operator">&gt;</span> /etc/sudoers: 语法错误 near line <span class="token number">123</span> <span class="token operator">&lt;&lt;&lt;</span>
<span class="token operator">&gt;&gt;</span><span class="token operator">&gt;</span> /etc/sudoers: 语法错误 near line <span class="token number">124</span> <span class="token operator">&lt;&lt;&lt;</span>
<span class="token operator">&gt;&gt;</span><span class="token operator">&gt;</span> /etc/sudoers: 语法错误 near line <span class="token number">125</span> <span class="token operator">&lt;&lt;&lt;</span>
<span class="token operator">&gt;&gt;</span><span class="token operator">&gt;</span> /etc/sudoers: 语法错误 near line <span class="token number">126</span> <span class="token operator">&lt;&lt;&lt;</span>
sudo: /etc/sudoers 中第 <span class="token number">101</span> 行附近有解析错误
sudo: 没有找到有效的 sudoers 资源，退出
sudo: 无法初始化策略插件
<span class="token punctuation">[</span>fog@VM-0-14-centos root<span class="token punctuation">]</span>$ 

</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br><span class="line-number">32</span><br></div></div></li></ul> <h3 id="_1-5-sudo权限设置"><a href="#_1-5-sudo权限设置" class="header-anchor">#</a> 1.5.sudo权限设置</h3> <h4 id="_1-5-1-查看自己账号的sudo权限"><a href="#_1-5-1-查看自己账号的sudo权限" class="header-anchor">#</a> 1.5.1.查看自己账号的sudo权限</h4> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token function">sudo</span> -l
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>效果如下『权限分配过高』：</p> <div class="language-txt line-numbers-mode"><pre class="language-text"><code>[fog@VM-0-14-centos root]$ sudo -l
[sudo] password for fog: 
Matching Defaults entries for fog on VM-0-14-centos:
    !visiblepw, always_set_home, match_group_by_gid, always_query_group_plugin, env_reset,
    env_keep=&quot;COLORS DISPLAY HOSTNAME HISTSIZE KDEDIR LS_COLORS&quot;, env_keep+=&quot;MAIL PS1 PS2
    QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE&quot;, env_keep+=&quot;LC_COLLATE LC_IDENTIFICATION
    LC_MEASUREMENT LC_MESSAGES&quot;, env_keep+=&quot;LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER
    LC_TELEPHONE&quot;, env_keep+=&quot;LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY&quot;,
    secure_path=/sbin\:/bin\:/usr/sbin\:/usr/bin

User fog may run the following commands on VM-0-14-centos:
    (ALL) ALL
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br></div></div><h4 id="_1-5-2-查看所有的用户信息"><a href="#_1-5-2-查看所有的用户信息" class="header-anchor">#</a> 1.5.2.查看所有的用户信息</h4> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token function">cat</span> /etc/passwd
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>cat /etc/passwd|grep 用户名，用于查找某个用户。</p> <h4 id="_1-5-3-查看所有组信息"><a href="#_1-5-3-查看所有组信息" class="header-anchor">#</a> 1.5.3.查看所有组信息</h4> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token function">cat</span> /etc/group
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>cat /etc/group|grep 组名，用于查找某个用户组。</p> <h4 id="_1-5-4-增加sudo权限"><a href="#_1-5-4-增加sudo权限" class="header-anchor">#</a> 1.5.4.增加sudo权限</h4> <p>1.添加文件的写权限。也就是输入命令</p> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token function">chmod</span> utw /etc/sudoers
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>2.编辑<code>/etc/sudoers</code>文件。</p> <p>也就是输入命令<code>vim /etc/sudoers</code>,进入编辑模式，找到这一行:</p> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>root <span class="token assign-left variable">ALL</span><span class="token operator">=</span><span class="token punctuation">(</span>ALL<span class="token punctuation">)</span> ALL
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>(会用vim编辑器的可以使用“/root ALL=(ALL)ALL”定位）</p> <p>在起下面添加”xxx ALL=(ALL)ALL”(这里的xxx是你的用户名)，然后保存退出。</p> <p>比如下面的</p> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>fog     <span class="token assign-left variable">ALL</span><span class="token operator">=</span><span class="token punctuation">(</span>ALL<span class="token punctuation">)</span>       ALL
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><div class="language-txt line-numbers-mode"><pre class="language-text"><code>## Next comes the main part: which users can run what software on 
## which machines (the sudoers file can be shared between multiple
## systems).
## Syntax:
##
##      user    MACHINE=COMMANDS
##
## The COMMANDS section may have other options added to it.
##
## Allow root to run any commands anywhere 
root    ALL=(ALL)       ALL
fog     ALL=(ALL)       ALL
## Allows members of the 'sys' group to run networking, software, 
## service management apps and more.
# %sys ALL = NETWORKING, SOFTWARE, SERVICES, STORAGE, DELEGATING, PROCESSES, LOCATE, DRIVERS

## Allows people in group wheel to run all commands
%wheel  ALL=(ALL)       ALL

## Same thing without a password
# %wheel        ALL=(ALL)       NOPASSWD: ALL

## Allows members of the users group to mount and unmount 
省略————————————————————————————————————————————————————————
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br></div></div><p>3.撤销文件的写权限。也就是输入命令”chmod u-w /etc/sudoers”。</p> <h3 id="_1-6-ssh远程连接到『公网』-腾讯服务器"><a href="#_1-6-ssh远程连接到『公网』-腾讯服务器" class="header-anchor">#</a> 1.6.ssh远程连接到『公网』  腾讯服务器</h3> <ul><li>公网IP，用『111.111.111.111』进行隐匿</li> <li><a href="https://www.etuan.com/zx/70-1018.html" target="_blank" rel="noopener noreferrer">参考文章<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul> <div class="language-txt line-numbers-mode"><pre class="language-text"><code>-q Quiet mode.  Causes most warning and diagnostic messages to be suppressed. 
安静模式。导致大多数警告和诊断消息被抑制。
-l login_name
-p port 端口号
-L address 公网地址？？
hacv@DebianLinux:~$ ssh -v
usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface]
           [-b bind_address] [-c cipher_spec] [-D [bind_address:]port]
           [-E log_file] [-e escape_char] [-F configfile] [-I pkcs11]
           [-i identity_file] [-J [user@]host[:port]] [-L address]
           [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
           [-Q query_option] [-R address] [-S ctl_path] [-W host:port]
           [-w local_tun[:remote_tun]] destination [command]
hacv@DebianLinux:~$ ssh -V
OpenSSH_7.9p1 Debian-10+deb10u1, OpenSSL 1.1.1d  10 Sep 2019
hacv@DebianLinux:~$ 

</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br></div></div><h4 id="_1-6-1-方法1"><a href="#_1-6-1-方法1" class="header-anchor">#</a> 1.6.1.方法1</h4> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>hacv@DebianLinux:~$ <span class="token function">ssh</span> -q -l hacv -p <span class="token number">22</span> <span class="token number">111.111</span>.111.111
The authenticity of <span class="token function">host</span> <span class="token string">'111.111.111.111 (111.111.111.111)'</span> can<span class="token string">'t be established.
ECDSA key fingerprint is SHA256:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX省略.
Are you sure you want to continue connecting (yes/no)? yes
hacv@111.111.111.111'</span>s password: 
Last login: Sun Jan <span class="token number">31</span> <span class="token number">15</span>:38:13 <span class="token number">2021</span>
<span class="token punctuation">[</span>hacv@VM-0-14-centos ~<span class="token punctuation">]</span>$ <span class="token function">whoami</span>
fog

『翻译』
无法确定主机“111.111.111.111（111.111.111.111）”的真实性。

ECDSA密钥指纹是SHA256:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX省略。

是否确实要继续连接（是/否）？

</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br></div></div><h4 id="_1-6-2-方法2『常用』"><a href="#_1-6-2-方法2『常用』" class="header-anchor">#</a> 1.6.2.方法2『常用』</h4> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token function">ssh</span> -p <span class="token number">22</span> root@111.111.111.111

或者不用端口也行『常用下面的』
<span class="token function">ssh</span> root@111.111.111.111
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div><ul><li><p>windows下使用ssh</p></li> <li><p>windows下<a href="https://zhidao.baidu.com/question/1836243659689646580.html" target="_blank" rel="noopener noreferrer">如何开启ssh<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></p></li> <li><p>Windows下<a href="https://blog.csdn.net/zhunju0089/article/details/103443715" target="_blank" rel="noopener noreferrer">cmd命令行执行连接远程服务器<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a>ssh命令</p></li></ul> <h2 id="⭐️我的debian系"><a href="#⭐️我的debian系" class="header-anchor">#</a> ⭐️我的Debian系</h2> <h3 id="_01-典型种类"><a href="#_01-典型种类" class="header-anchor">#</a> 01.典型种类</h3> <ul><li>Debian</li> <li><strong>Ubuntu</strong></li> <li><strong>Deepin</strong>『国产』</li> <li><strong>KaLi</strong></li></ul> <h3 id="_02-简易安装和包"><a href="#_02-简易安装和包" class="header-anchor">#</a> 02.简易安装和包</h3> <ul><li>Deb包</li> <li>命令是dpkg</li> <li>apt</li></ul> <h3 id="_03-区别apt和apt-get"><a href="#_03-区别apt和apt-get" class="header-anchor">#</a> 03.区别<code>apt</code>和<code>apt-get</code></h3> <ul><li>1、虽然 apt 与 apt-get 有一些类似的命令选项，但它并不能完全向下兼容 apt-get 命令。也就是说，可以用 apt 替换部分 apt-get 系列命令，但不是全部。</li> <li>2、不仅因为<strong>广大 Linux 发行商都在推荐 apt</strong>，更主要的还是它提供了 Linux 包管理的必要选项。</li> <li>3、目前还没有任何 Linux 发行版官方放出 apt-get 将被停用的消息，至少它还有比 apt 更多、更细化的操作功能。对于『低级操作，仍然需要 apt-get』</li></ul> <h4 id="_3-1-apt命令"><a href="#_3-1-apt命令" class="header-anchor">#</a> 3.1.apt命令</h4> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token function">apt</span> <span class="token number">1.8</span>.2 <span class="token punctuation">(</span>amd64<span class="token punctuation">)</span>
用法： <span class="token function">apt</span> <span class="token punctuation">[</span>选项<span class="token punctuation">]</span> 命令

命令行软件包管理器 <span class="token function">apt</span> 提供软件包搜索，管理和信息查询等功能。
它提供的功能与其他 APT 工具相同（像 <span class="token function">apt-get</span> 和 apt-cache），
但是默认情况下被设置得更适合交互。

常用命令：
  list - 根据名称列出软件包
  search - 搜索软件包描述
  show - 显示软件包细节
  <span class="token function">install</span> - 安装软件包
  reinstall - reinstall packages
  remove - 移除软件包
  autoremove - 卸载所有自动安装且不再使用的软件包
  update - 更新可用软件包列表
  upgrade - 通过 安装/升级 软件来更新系统
  full-upgrade - 通过 卸载/安装/升级 来更新系统
  edit-sources - 编辑软件源信息文件

参见 apt<span class="token punctuation">(</span><span class="token number">8</span><span class="token punctuation">)</span> 以获取更多关于可用命令的信息。
程序配置选项及语法都已经在 apt.conf<span class="token punctuation">(</span><span class="token number">5</span><span class="token punctuation">)</span> 中阐明。
欲知如何配置软件源，请参阅 sources.list<span class="token punctuation">(</span><span class="token number">5</span><span class="token punctuation">)</span>。
软件包及其版本偏好可以通过 apt_preferences<span class="token punctuation">(</span><span class="token number">5</span><span class="token punctuation">)</span> 来设置。
关于安全方面的细节可以参考 apt-secure<span class="token punctuation">(</span><span class="token number">8</span><span class="token punctuation">)</span>.
                                         本 APT 具有超级牛力。
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br></div></div><div class="language-bash line-numbers-mode"><pre class="language-bash"><code>hacv@DebianLinux:~$ <span class="token function">apt</span> list gcc
正在列表<span class="token punctuation">..</span>. 完成
gcc/未知,now <span class="token number">4</span>:8.3.0-1 amd64 <span class="token punctuation">[</span>已安装，自动<span class="token punctuation">]</span>
gcc/未知 <span class="token number">4</span>:8.3.0-1 i386
hacv@DebianLinux:~$ <span class="token function">apt</span> show gcc
Package: gcc
Version: <span class="token number">4</span>:8.3.0-1
Priority: optional
Section: devel
Source: gcc-defaults <span class="token punctuation">(</span><span class="token number">1.181</span><span class="token punctuation">)</span>
Maintainer: Debian GCC Maintainers <span class="token operator">&lt;</span>debian-gcc@lists.debian.org<span class="token operator">&gt;</span>
Installed-Size: <span class="token number">46.1</span> kB
Provides: c-compiler, gcc-x86-64-linux-gnu <span class="token punctuation">(</span><span class="token operator">=</span> <span class="token number">4</span>:8.3.0-1<span class="token punctuation">)</span>
Depends: cpp <span class="token punctuation">(</span><span class="token operator">=</span> <span class="token number">4</span>:8.3.0-1<span class="token punctuation">)</span>, gcc-8 <span class="token punctuation">(</span><span class="token operator">&gt;</span><span class="token operator">=</span> <span class="token number">8.3</span>.0-1~<span class="token punctuation">)</span>
Recommends: libc6-dev <span class="token operator">|</span> libc-dev
Suggests: gcc-multilib, make, manpages-dev, autoconf, automake, libtool, flex, bison, gdb, gcc-doc
Conflicts: gcc-doc <span class="token punctuation">(</span><span class="token operator">&lt;&lt;</span> <span class="token number">1</span>:2.95.3<span class="token punctuation">)</span>
Download-Size: <span class="token number">5,196</span> B
APT-Manual-Installed: no
APT-Sources: https://community-packages.deepin.com/deepin apricot/main amd64 Packages
Description: GNU C compiler
 This is the GNU C compiler, a fairly portable optimizing compiler <span class="token keyword">for</span> C.
 <span class="token builtin class-name">.</span>
 This is a dependency package providing the default GNU C compiler.

</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br></div></div><h4 id="_3-2-apt-get命令"><a href="#_3-2-apt-get命令" class="header-anchor">#</a> 3.2.apt-get命令</h4> <ul><li>Ubuntu缺省情况下，并没有提供C/C++的编译环境，因此还需要手动安装</li> <li>如果单独安装gcc以及g++比较麻烦，幸运的是，为了能够编译Ubuntu的内核，Ubuntu提供了一个build-essential软件包。</li></ul> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token function">sudo</span> <span class="token function">apt-get</span> <span class="token function">install</span> build-essential	
<span class="token comment">#安装一堆，开发包，比如</span>

<span class="token function">sudo</span> <span class="token function">apt</span> <span class="token function">install</span> net-tools
原因：本地没有该功能的资源
解决方法：使用sudo <span class="token function">apt-get</span> update命令进行更新资源
<span class="token function">sudo</span> <span class="token function">apt-get</span> update	
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br></div></div><h4 id="_3-3-apt最常用的命令『4大金刚』"><a href="#_3-3-apt最常用的命令『4大金刚』" class="header-anchor">#</a> 3.3.apt最常用的命令『4大金刚』</h4> <table><thead><tr><th>命令</th> <th>说明</th></tr></thead> <tbody><tr><td><code>apt update</code></td> <td>用于（更新系统软件源中的所有软件列表），通常我们在第一次安装软包或者apt源时会执行该命令(等价于&quot;apt-get update&quot;命令)，需要『<strong>管理员权限</strong>』</td></tr> <tr><td><code>apt search 模糊的软件的名字</code></td> <td>找到和这个关键字相关的软件包，然后你就可以使用对应的去install了。很有用。在apt install之前使用</td></tr> <tr><td><code>apt install 完整的包名字</code></td> <td>技巧，记得用Tab，可以提示（从源中有的进行提示）。安装指定软件(等价于&quot;apt-get install&quot;命令)，此命令需管理员权限。如安装ssh服务：<code>apt install openssh-server</code></td></tr> <tr><td><code>apt remove 要卸载的包</code></td> <td>技巧，记得用Tab，可以提示（从你已经安装的软件中提示）.用来卸载指定软件(等价于&quot;apt-get remove&quot;命令)， 此命令需管理员权限，如要卸载vim命令：</td></tr> <tr><td><code>apt list</code></td> <td></td></tr></tbody></table> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>hacv@DebianLinux:~$ <span class="token function">apt</span> remove <span class="token function">open</span>
openconnect          openprinting-ppds    openssh-client       openssh-server       openssh-sftp-server  openssl              openvpn
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br></div></div><div class="language-bash line-numbers-mode"><pre class="language-bash"><code>hacv@DebianLinux:~$ <span class="token function">apt</span> list gcc
正在列表<span class="token punctuation">..</span>. 完成
gcc/未知,now <span class="token number">4</span>:8.3.0-1 amd64 <span class="token punctuation">[</span>已安装，自动<span class="token punctuation">]</span>
gcc/未知 <span class="token number">4</span>:8.3.0-1 i386
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div><ul><li>apt search &lt;软件关键字&gt;</li></ul> <p>通过关键字进行搜索，列出所有与该关键字相关的软件包和其描述(等价于&quot;apt-cache search&quot;命令)，如我们要搜索ssh服务软件包，但又不知道详细的名称，可输入如下命令搜索：</p> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token function">apt</span> search <span class="token function">ssh</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>通过搜索查找，我们可确认ssh服务的软件包名称为openssh-server,此时可用上面介绍的&quot;apt install openssh-server&quot;命令对ssh服务进行安装</p> <h4 id="_3-4-uname"><a href="#_3-4-uname" class="header-anchor">#</a> 3.4.uname</h4> <table><thead><tr><th>uname -a</th> <th>all 打印所有内核、操作系统版本、物理机名字相关信息</th></tr></thead> <tbody><tr><td>uname -m</td> <td>打印这个操作系统是32还是64位的，非常建议装64位的。好多Linux软件都只提供64位的了</td></tr> <tr><td>uname -n</td> <td>机器名字、等价于hostname命令</td></tr> <tr><td></td> <td></td></tr></tbody></table> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>hacv@DebianLinux:~$ <span class="token function">uname</span> -m
x86_64
hacv@DebianLinux:~$ <span class="token function">uname</span> -n
DebianLinux
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div><p>修改『机器名』</p> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token function">vim</span> /etc/hostname
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>进入修改后，重启之后，机器名字就能修改了</p> <h3 id="_04-linux下装了x切换状态"><a href="#_04-linux下装了x切换状态" class="header-anchor">#</a> 04.Linux下装了X切换状态</h3> <blockquote><p>下述操作『一切的前提是，装了那个X界面』</p></blockquote> <p>tty1的命令行界面，切换到X界面
这种回到桌面，是回答登录界面，而不是不用登录</p> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>init <span class="token number">5</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>或者下面这个能够直接回到桌面！！！</p> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>startx
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>X界面切换到命令行界面</p> <p>下面这种，我不知道为什么，每次执行之后，键盘也打不进字了。。。只能用快捷键『Ctrl+Alt+F1到F6』</p> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>init <span class="token number">3</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h3 id="_05-2大系统的多用户命令"><a href="#_05-2大系统的多用户命令" class="header-anchor">#</a> 05.2大系统的多用户命令</h3> <blockquote><p>2大系统的『用户添加、删除』命令</p></blockquote> <h3 id="_1、linux下的命令"><a href="#_1、linux下的命令" class="header-anchor">#</a> 1、Linux下的命令</h3> <p><strong>（1）创建新用户useradd</strong></p> <ul><li>比如。创建普通用户</li> <li>用该命令创建用户的时候，默认的用户家目录会被存在<code>/home</code>下</li> <li>我们的root的家目录在<code>~/</code>下，很别致吧</li></ul> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token function">useradd</span> hacv
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>这样就添加了<code>hacv</code>用户，默认没有密码</p> <p><strong>（2）修改用户密码passwd</strong></p> <ul><li><p>很熟悉吧，在你装系统到U盘中（是的，U盘和我们的硬盘没有啥两样），后面改root的账号</p></li> <li><div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token function">passwd</span> hacv
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div></li> <li><p>修改用户<code>hacv</code>的密码</p></li></ul> <p><strong>（3）删除用户userdel</strong></p> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token function">userdel</span> -r hacv
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><ul><li>递归的删除，用户及其家目录！</li></ul> <h3 id="_2、windows下的命令"><a href="#_2、windows下的命令" class="header-anchor">#</a> 2、Windows下的命令</h3> <div class="language-txt line-numbers-mode"><pre class="language-text"><code>NET USER
[username [password | *] [options]] [/DOMAIN]
         username {password | *} /add [options] [/DOMAIN]
         username [/DELETE] [/DOMAIN]
         username [/TIMES:{times | ALL}]
         username [/ACTIVE: {YES | NO}]
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br></div></div><ul><li>和Linux的一系列命令都不一样！</li></ul> <blockquote><table><thead><tr><th>Windows</th> <th>Linux</th></tr></thead> <tbody><tr><td>net user 、add</td> <td></td></tr> <tr><td>net user</td> <td></td></tr> <tr><td></td> <td></td></tr></tbody></table></blockquote> <h2 id="八、换源和装pinyin包"><a href="#八、换源和装pinyin包" class="header-anchor">#</a> 八、换源和装pinyin包</h2> <ul><li>2020版的Kali Linux的源默认是</li></ul> <div class="language-txt line-numbers-mode"><pre class="language-text"><code># See https://www.kali.org/docs/general-use/kali-linux-sources-list-repositories/
deb http://http.kali.org/kali kali-rolling main contrib non-free

# Additional line for source packages
# deb-src http://http.kali.org/kali kali-rolling main contrib non-free
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br></div></div><ul><li>在国内似乎是不OK的</li></ul> <h3 id="（1）-换源，直接放进下面的保存到source-list就行了"><a href="#（1）-换源，直接放进下面的保存到source-list就行了" class="header-anchor">#</a> （1）.换源，直接放进下面的保存到source.list就行了</h3> <ul><li>要想办法，写个东西，对付，不同的Linux版本，用什么样的源。。</li></ul> <div class="language-txt line-numbers-mode"><pre class="language-text"><code>#阿里云
deb http://mirrors.aliyun.com/kali kali-rolling main non-free contrib
deb-src http://mirrors.aliyun.com/kali kali-rolling main non-free contrib
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br></div></div><h3 id="（2）-『由于网络问题』会导致的问题"><a href="#（2）-『由于网络问题』会导致的问题" class="header-anchor">#</a> （2）.『由于网络问题』会导致的问题</h3> <p>（1）第1点 apt-get update 更新失败如下，
原因是：期间由于我的那个坏的网卡，我的电脑断网了</p> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>┌──<span class="token punctuation">(</span>root💀HACV<span class="token punctuation">)</span>-<span class="token punctuation">[</span>/etc/apt<span class="token punctuation">]</span>
└─<span class="token comment"># apt-get update</span>
获取:1 http://mirrors.aliyun.com/kali kali-rolling InRelease <span class="token punctuation">[</span><span class="token number">30.5</span> kB<span class="token punctuation">]</span>
获取:2 http://mirrors.aliyun.com/kali kali-rolling/contrib Sources <span class="token punctuation">[</span><span class="token number">63.1</span> kB<span class="token punctuation">]</span>
忽略:2 http://mirrors.aliyun.com/kali kali-rolling/contrib Sources        
忽略:3 http://mirrors.aliyun.com/kali kali-rolling/non-free Sources
忽略:4 http://mirrors.aliyun.com/kali kali-rolling/main Sources
忽略:5 http://mirrors.aliyun.com/kali kali-rolling/main i386 Packages
忽略:6 http://mirrors.aliyun.com/kali kali-rolling/non-free i386 Packages
忽略:7 http://mirrors.aliyun.com/kali kali-rolling/contrib i386 Packages
忽略:2 http://mirrors.aliyun.com/kali kali-rolling/contrib Sources
错误:3 http://mirrors.aliyun.com/kali kali-rolling/non-free Sources
  无法发起与 mirrors.aliyun.com:80 <span class="token punctuation">(</span><span class="token number">113.219</span>.136.87<span class="token punctuation">)</span> 的连接 - connect <span class="token punctuation">(</span><span class="token number">101</span>: 网络不可达<span class="token punctuation">)</span> 无法发起与 mirrors.aliyun.com:80 <span class="token punctuation">(</span><span class="token number">175.6</span>.241.245<span class="token punctuation">)</span> 的连接 - connect <span class="token punctuation">(</span><span class="token number">101</span>: 网络不可达<span class="token punctuation">)</span> 无法发起与 mirrors.aliyun.com:80 <span class="token punctuation">(</span><span class="token number">124.232</span>.169.223<span class="token punctuation">)</span> 的连接 - connect <span class="token punctuation">(</span><span class="token number">101</span>: 网络不可达<span class="token punctuation">)</span> 无法发起与 mirrors.aliyun.com:80 <span class="token punctuation">(</span><span class="token number">175.6</span>.241.248<span class="token punctuation">)</span> 的连接 - connect <span class="token punctuation">(</span><span class="token number">101</span>: 网络不可达<span class="token punctuation">)</span> 无法发起与 mirrors.aliyun.com:80 <span class="token punctuation">(</span><span class="token number">175.6</span>.49.244<span class="token punctuation">)</span> 的连接 - connect <span class="token punctuation">(</span><span class="token number">101</span>: 网络不可达<span class="token punctuation">)</span> 无法发起与 mirrors.aliyun.com:80 <span class="token punctuation">(</span><span class="token number">175.6</span>.241.246<span class="token punctuation">)</span> 的连接 - connect <span class="token punctuation">(</span><span class="token number">101</span>: 网络不可达<span class="token punctuation">)</span> 无法发起与 mirrors.aliyun.com:80 <span class="token punctuation">(</span><span class="token number">175.6</span>.50.230<span class="token punctuation">)</span> 的连接 - connect <span class="token punctuation">(</span><span class="token number">101</span>: 网络不可达<span class="token punctuation">)</span> 无法发起与 mirrors.aliyun.com:80 <span class="token punctuation">(</span><span class="token number">175.6</span>.49.243<span class="token punctuation">)</span> 的连接 - connect <span class="token punctuation">(</span><span class="token number">101</span>: 网络不可达<span class="token punctuation">)</span> 无法发起与 mirrors.aliyun.com:80 <span class="token punctuation">(</span><span class="token number">175.6</span>.241.244<span class="token punctuation">)</span> 的连接 - connect <span class="token punctuation">(</span><span class="token number">101</span>: 网络不可达<span class="token punctuation">)</span> <span class="token punctuation">[</span>IP: <span class="token number">113.219</span>.136.87 <span class="token number">80</span><span class="token punctuation">]</span>
忽略:4 http://mirrors.aliyun.com/kali kali-rolling/main Sources
忽略:5 http://mirrors.aliyun.com/kali kali-rolling/main i386 Packages
忽略:6 http://mirrors.aliyun.com/kali kali-rolling/non-free i386 Packages
忽略:7 http://mirrors.aliyun.com/kali kali-rolling/contrib i386 Packages
忽略:2 http://mirrors.aliyun.com/kali kali-rolling/contrib Sources
已下载 <span class="token number">30.5</span> kB，耗时 <span class="token number">31</span>秒 <span class="token punctuation">(</span><span class="token number">972</span> B/s<span class="token punctuation">)</span>
正在读取软件包列表<span class="token punctuation">..</span>. 完成
E: 无法下载 http://mirrors.aliyun.com/kali/dists/kali-rolling/non-free/source/Sources  无法发起与 mirrors.aliyun.com:80 <span class="token punctuation">(</span><span class="token number">113.219</span>.136.87<span class="token punctuation">)</span> 的连接 - connect <span class="token punctuation">(</span><span class="token number">101</span>: 网络不可达<span class="token punctuation">)</span> 无法发起与 mirrors.aliyun.com:80 <span class="token punctuation">(</span><span class="token number">175.6</span>.241.245<span class="token punctuation">)</span> 的连接 - connect <span class="token punctuation">(</span><span class="token number">101</span>: 网络不可达<span class="token punctuation">)</span> 无法发起与 mirrors.aliyun.com:80 <span class="token punctuation">(</span><span class="token number">124.232</span>.169.223<span class="token punctuation">)</span> 的连接 - connect <span class="token punctuation">(</span><span class="token number">101</span>: 网络不可达<span class="token punctuation">)</span> 无法发起与 mirrors.aliyun.com:80 <span class="token punctuation">(</span><span class="token number">175.6</span>.241.248<span class="token punctuation">)</span> 的连接 - connect <span class="token punctuation">(</span><span class="token number">101</span>: 网络不可达<span class="token punctuation">)</span> 无法发起与 mirrors.aliyun.com:80 <span class="token punctuation">(</span><span class="token number">175.6</span>.49.244<span class="token punctuation">)</span> 的连接 - connect <span class="token punctuation">(</span><span class="token number">101</span>: 网络不可达<span class="token punctuation">)</span> 无法发起与 mirrors.aliyun.com:80 <span class="token punctuation">(</span><span class="token number">175.6</span>.241.246<span class="token punctuation">)</span> 的连接 - connect <span class="token punctuation">(</span><span class="token number">101</span>: 网络不可达<span class="token punctuation">)</span> 无法发起与 mirrors.aliyun.com:80 <span class="token punctuation">(</span><span class="token number">175.6</span>.50.230<span class="token punctuation">)</span> 的连接 - connect <span class="token punctuation">(</span><span class="token number">101</span>: 网络不可达<span class="token punctuation">)</span> 无法发起与 mirrors.aliyun.com:80 <span class="token punctuation">(</span><span class="token number">175.6</span>.49.243<span class="token punctuation">)</span> 的连接 - connect <span class="token punctuation">(</span><span class="token number">101</span>: 网络不可达<span class="token punctuation">)</span> 无法发起与 mirrors.aliyun.com:80 <span class="token punctuation">(</span><span class="token number">175.6</span>.241.244<span class="token punctuation">)</span> 的连接 - connect <span class="token punctuation">(</span><span class="token number">101</span>: 网络不可达<span class="token punctuation">)</span> <span class="token punctuation">[</span>IP: <span class="token number">113.219</span>.136.87 <span class="token number">80</span><span class="token punctuation">]</span>
E: 部分索引文件下载失败。如果忽略它们，那将转而使用旧的索引文件。
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br></div></div><h3 id="（2）由（1）导致的2-想安装『中文』apt-get-install-ibus-ibus-pinyin-也不ok"><a href="#（2）由（1）导致的2-想安装『中文』apt-get-install-ibus-ibus-pinyin-也不ok" class="header-anchor">#</a> （2）由（1）导致的2 想安装『中文』apt-get install ibus ibus-pinyin~  也不OK</h3> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>┌──<span class="token punctuation">(</span>root💀HACV<span class="token punctuation">)</span>-<span class="token punctuation">[</span>/etc/apt<span class="token punctuation">]</span>
└─<span class="token comment"># apt-get update                                                   100 ⨯</span>
忽略:1 http://mirrors.aliyun.com/kali kali-rolling InRelease
忽略:1 http://mirrors.aliyun.com/kali kali-rolling InRelease
忽略:1 http://mirrors.aliyun.com/kali kali-rolling InRelease
错误:1 http://mirrors.aliyun.com/kali kali-rolling InRelease
  暂时不能解析域名“mirrors.aliyun.com”
正在读取软件包列表<span class="token punctuation">..</span>. 完成
W: 无法下载 http://mirrors.aliyun.com/kali/dists/kali-rolling/InRelease  暂时不能解析域名“mirrors.aliyun.com”
W: 部分索引文件下载失败。如果忽略它们，那将转而使用旧的索引文件。
      

┌──<span class="token punctuation">(</span>root💀HACV<span class="token punctuation">)</span>-<span class="token punctuation">[</span>/etc/apt<span class="token punctuation">]</span>
└─<span class="token comment"># apt-get install ibus ibus-pinyin~  </span>
正在读取软件包列表<span class="token punctuation">..</span>. 完成
正在分析软件包的依赖关系树       
正在读取状态信息<span class="token punctuation">..</span>. 完成       
E: 无法定位软件包 ibus
E: 无法定位软件包 ibus-pinyin~                                      
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br></div></div><h3 id="（3）安装完之后的操作"><a href="#（3）安装完之后的操作" class="header-anchor">#</a> （3）安装完之后的操作</h3> <p>中文</p> <p>only 阿里云</p> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>┌──<span class="token punctuation">(</span>redhat㉿HACV<span class="token punctuation">)</span>-<span class="token punctuation">[</span>~<span class="token punctuation">]</span>
└─$ <span class="token function">apt-get</span> <span class="token function">install</span> ibus ibus-pinyin 
E: 无法打开锁文件 /var/lib/dpkg/lock-frontend - <span class="token function">open</span> <span class="token punctuation">(</span><span class="token number">13</span>: 权限不够<span class="token punctuation">)</span>
E: 无法获取 dpkg 前端锁 <span class="token punctuation">(</span>/var/lib/dpkg/lock-frontend<span class="token punctuation">)</span>，请查看您是否正以 root 用户运行？
                                                                                                                                                                      
┌──<span class="token punctuation">(</span>redhat㉿HACV<span class="token punctuation">)</span>-<span class="token punctuation">[</span>~<span class="token punctuation">]</span>
└─$ <span class="token function">su</span>                                                                                                                                                          <span class="token number">100</span> ⨯
密码：
┌──<span class="token punctuation">(</span>root💀HACV<span class="token punctuation">)</span>-<span class="token punctuation">[</span>/home/redhat<span class="token punctuation">]</span>
└─<span class="token comment"># apt-get install ibus ibus-pinyin </span>
正在读取软件包列表<span class="token punctuation">..</span>. 完成
正在分析软件包的依赖关系树       
正在读取状态信息<span class="token punctuation">..</span>. 完成       
将会同时安装下列软件：
  dconf-cli gir1.2-ibus-1.0 ibus-data ibus-gtk ibus-gtk3 im-config libibus-1.0-5 liblua5.4-0 libpyzy-1.0-0v5 python3-ibus-1.0
建议安装：
  ibus-clutter ibus-doc
下列【新】软件包将被安装：
  dconf-cli gir1.2-ibus-1.0 ibus ibus-data ibus-gtk ibus-gtk3 ibus-pinyin im-config libibus-1.0-5 liblua5.4-0 libpyzy-1.0-0v5 python3-ibus-1.0
升级了 <span class="token number">0</span> 个软件包，新安装了 <span class="token number">12</span> 个软件包，要卸载 <span class="token number">0</span> 个软件包，有 <span class="token number">127</span> 个软件包未被升级。
需要下载 <span class="token number">23.2</span> MB 的归档。
解压缩后会消耗 <span class="token number">128</span> MB 的额外空间。
您希望继续执行吗？ <span class="token punctuation">[</span>Y/n<span class="token punctuation">]</span> y
获取:1 http://mirrors.neusoft.edu.cn/kali kali-rolling/main i386 dconf-cli i386 <span class="token number">0.38</span>.0-1 <span class="token punctuation">[</span><span class="token number">33.8</span> kB<span class="token punctuation">]</span>
获取:2 http://mirrors.neusoft.edu.cn/kali kali-rolling/main i386 libibus-1.0-5 i386 <span class="token number">1.5</span>.23-2 <span class="token punctuation">[</span><span class="token number">410</span> kB<span class="token punctuation">]</span>
获取:3 http://mirrors.neusoft.edu.cn/kali kali-rolling/main i386 gir1.2-ibus-1.0 i386 <span class="token number">1.5</span>.23-2 <span class="token punctuation">[</span><span class="token number">317</span> kB<span class="token punctuation">]</span>      
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br></div></div><div class="language-cpp line-numbers-mode"><pre class="language-cpp"><code>┌──<span class="token punctuation">(</span>root💀HACV<span class="token punctuation">)</span><span class="token operator">-</span><span class="token punctuation">[</span><span class="token operator">/</span>home<span class="token operator">/</span>redhat<span class="token punctuation">]</span>
└─# apt<span class="token operator">-</span>get install ibus ibus<span class="token operator">-</span>pinyin 
正在读取软件包列表<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span> 完成
正在分析软件包的依赖关系树       
正在读取状态信息<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span> 完成       
将会同时安装下列软件：
  dconf<span class="token operator">-</span>cli gir1<span class="token punctuation">.</span><span class="token number">2</span><span class="token operator">-</span>ibus<span class="token operator">-</span><span class="token number">1.0</span> ibus<span class="token operator">-</span>data ibus<span class="token operator">-</span>gtk ibus<span class="token operator">-</span>gtk3 im<span class="token operator">-</span>config libibus<span class="token operator">-</span><span class="token number">1.0</span><span class="token operator">-</span><span class="token number">5</span> liblua5<span class="token punctuation">.</span><span class="token number">4</span><span class="token operator">-</span><span class="token number">0</span> libpyzy<span class="token operator">-</span><span class="token number">1.0</span><span class="token operator">-</span><span class="token number">0</span>v5 python3<span class="token operator">-</span>ibus<span class="token operator">-</span><span class="token number">1.0</span>
建议安装：
  ibus<span class="token operator">-</span>clutter ibus<span class="token operator">-</span>doc
下列【新】软件包将被安装：
  dconf<span class="token operator">-</span>cli gir1<span class="token punctuation">.</span><span class="token number">2</span><span class="token operator">-</span>ibus<span class="token operator">-</span><span class="token number">1.0</span> ibus ibus<span class="token operator">-</span>data ibus<span class="token operator">-</span>gtk ibus<span class="token operator">-</span>gtk3 ibus<span class="token operator">-</span>pinyin im<span class="token operator">-</span>config libibus<span class="token operator">-</span><span class="token number">1.0</span><span class="token operator">-</span><span class="token number">5</span> liblua5<span class="token punctuation">.</span><span class="token number">4</span><span class="token operator">-</span><span class="token number">0</span> libpyzy<span class="token operator">-</span><span class="token number">1.0</span><span class="token operator">-</span><span class="token number">0</span>v5 python3<span class="token operator">-</span>ibus<span class="token operator">-</span><span class="token number">1.0</span>
升级了 <span class="token number">0</span> 个软件包，新安装了 <span class="token number">12</span> 个软件包，要卸载 <span class="token number">0</span> 个软件包，有 <span class="token number">127</span> 个软件包未被升级。
需要下载 <span class="token number">23.2</span> MB 的归档。
解压缩后会消耗 <span class="token number">128</span> MB 的额外空间。
您希望继续执行吗？ <span class="token punctuation">[</span>Y<span class="token operator">/</span>n<span class="token punctuation">]</span> y
获取<span class="token operator">:</span><span class="token number">1</span> http<span class="token operator">:</span><span class="token comment">//mirrors.neusoft.edu.cn/kali kali-rolling/main i386 dconf-cli i386 0.38.0-1 [33.8 kB]</span>
获取<span class="token operator">:</span><span class="token number">2</span> http<span class="token operator">:</span><span class="token comment">//mirrors.neusoft.edu.cn/kali kali-rolling/main i386 libibus-1.0-5 i386 1.5.23-2 [410 kB]</span>
获取<span class="token operator">:</span><span class="token number">3</span> http<span class="token operator">:</span><span class="token comment">//mirrors.neusoft.edu.cn/kali kali-rolling/main i386 gir1.2-ibus-1.0 i386 1.5.23-2 [317 kB]                                                              </span>
获取<span class="token operator">:</span><span class="token number">4</span> http<span class="token operator">:</span><span class="token comment">//mirrors.neusoft.edu.cn/kali kali-rolling/main i386 ibus-data all 1.5.23-2 [5,692 kB]</span>
<span class="token number">25</span><span class="token operator">%</span> <span class="token punctuation">[</span><span class="token number">4</span> ibus<span class="token operator">-</span>data <span class="token number">5</span><span class="token punctuation">,</span><span class="token number">068</span> kB<span class="token operator">/</span><span class="token number">5</span><span class="token punctuation">,</span><span class="token number">692</span> kB <span class="token number">89</span><span class="token operator">%</span><span class="token punctuation">]</span>                                                                                                           <span class="token number">47.3</span> kB<span class="token operator">/</span>s <span class="token number">6</span>分 <span class="token number">7</span>秒<span class="token operator">^</span>X@获取<span class="token operator">:</span><span class="token number">5</span> http<span class="token operator">:</span><span class="token comment">//mirrors.neusoft.edu.cn/kali kali-rolling/main i386 python3-ibus-1.0 all 1.5.23-2 [259 kB]                                                              </span>
获取<span class="token operator">:</span><span class="token number">6</span> http<span class="token operator">:</span><span class="token comment">//mirrors.neusoft.edu.cn/kali kali-rolling/main i386 ibus i386 1.5.23-2 [562 kB]                                                                         </span>
获取<span class="token operator">:</span><span class="token number">7</span> http<span class="token operator">:</span><span class="token comment">//mirrors.neusoft.edu.cn/kali kali-rolling/main i386 ibus-gtk i386 1.5.23-2 [268 kB]                                                                     </span>
<span class="token number">35</span><span class="token operator">%</span> <span class="token punctuation">[</span><span class="token number">7</span> ibus<span class="token operator">-</span>gtk <span class="token number">62.6</span> kB<span class="token operator">/</span><span class="token number">268</span> kB <span class="token number">23</span><span class="token operator">%</span><span class="token punctuation">]</span>                                                                                                                                  
<span class="token number">35</span><span class="token operator">%</span> <span class="token punctuation">[</span><span class="token number">7</span> ibus<span class="token operator">-</span>gtk <span class="token number">62.6</span> kB<span class="token operator">/</span><span class="token number">268</span> kB <span class="token number">23</span><span class="token operator">%</span><span class="token punctuation">]</span>
忽略<span class="token operator">:</span><span class="token number">7</span> http<span class="token operator">:</span><span class="token comment">//mirrors.neusoft.edu.cn/kali kali-rolling/main i386 ibus-gtk i386 1.5.23-2</span>
获取<span class="token operator">:</span><span class="token number">8</span> http<span class="token operator">:</span><span class="token comment">//mirrors.neusoft.edu.cn/kali kali-rolling/main i386 ibus-gtk3 i386 1.5.23-2 [268 kB]</span>
获取<span class="token operator">:</span><span class="token number">9</span> http<span class="token operator">:</span><span class="token comment">//mirrors.neusoft.edu.cn/kali kali-rolling/main i386 liblua5.4-0 i386 5.4.2-1 [158 kB]</span>
获取<span class="token operator">:</span><span class="token number">10</span> http<span class="token operator">:</span><span class="token comment">//mirrors.neusoft.edu.cn/kali kali-rolling/main i386 libpyzy-1.0-0v5 i386 1.0.1-7 [14.7 MB]</span>
忽略<span class="token operator">:</span><span class="token number">10</span> http<span class="token operator">:</span><span class="token comment">//mirrors.neusoft.edu.cn/kali kali-rolling/main i386 libpyzy-1.0-0v5 i386 1.0.1-7                                                                       </span>
获取<span class="token operator">:</span><span class="token number">11</span> http<span class="token operator">:</span><span class="token comment">//mirrors.neusoft.edu.cn/kali kali-rolling/main i386 ibus-pinyin i386 1.5.0-6.1+b1 [488 kB]</span>
获取<span class="token operator">:</span><span class="token number">12</span> http<span class="token operator">:</span><span class="token comment">//mirrors.neusoft.edu.cn/kali kali-rolling/main i386 im-config all 0.46-1 [52.0 kB]                                                                     </span>
获取<span class="token operator">:</span><span class="token number">7</span> http<span class="token operator">:</span><span class="token comment">//mirrors.neusoft.edu.cn/kali kali-rolling/main i386 ibus-gtk i386 1.5.23-2 [268 kB]                                                                     </span>
获取<span class="token operator">:</span><span class="token number">10</span> http<span class="token operator">:</span><span class="token comment">//mirrors.neusoft.edu.cn/kali kali-rolling/main i386 libpyzy-1.0-0v5 i386 1.0.1-7 [14.7 MB]                                                             </span>
忽略<span class="token operator">:</span><span class="token number">10</span> http<span class="token operator">:</span><span class="token comment">//mirrors.neusoft.edu.cn/kali kali-rolling/main i386 libpyzy-1.0-0v5 i386 1.0.1-7                                                                       </span>
获取<span class="token operator">:</span><span class="token number">10</span> http<span class="token operator">:</span><span class="token comment">//mirrors.neusoft.edu.cn/kali kali-rolling/main i386 libpyzy-1.0-0v5 i386 1.0.1-7 [14.7 MB]</span>
忽略<span class="token operator">:</span><span class="token number">10</span> http<span class="token operator">:</span><span class="token comment">//mirrors.neusoft.edu.cn/kali kali-rolling/main i386 libpyzy-1.0-0v5 i386 1.0.1-7                                                                       </span>
获取<span class="token operator">:</span><span class="token number">10</span> http<span class="token operator">:</span><span class="token comment">//mirrors.neusoft.edu.cn/kali kali-rolling/main i386 libpyzy-1.0-0v5 i386 1.0.1-7 [14.7 MB]</span>
错误<span class="token operator">:</span><span class="token number">10</span> http<span class="token operator">:</span><span class="token comment">//mirrors.neusoft.edu.cn/kali kali-rolling/main i386 libpyzy-1.0-0v5 i386 1.0.1-7                                                                       </span>
  连接超时 <span class="token punctuation">[</span>IP<span class="token operator">:</span> <span class="token number">2001</span><span class="token operator">:</span>da8<span class="token operator">:</span>a807<span class="token operator">::</span><span class="token number">25</span> <span class="token number">80</span><span class="token punctuation">]</span>
已下载 <span class="token number">8</span><span class="token punctuation">,</span><span class="token number">445</span> kB，耗时 <span class="token number">7</span>分 <span class="token number">48</span>秒 <span class="token punctuation">(</span><span class="token number">18.1</span> kB<span class="token operator">/</span>s<span class="token punctuation">)</span>   
E<span class="token operator">:</span> 无法下载 http<span class="token operator">:</span><span class="token comment">//mirrors.neusoft.edu.cn/kali/pool/main/libp/libpyzy/libpyzy-1.0-0v5_1.0.1-7_i386.deb  连接超时 [IP: 2001:da8:a807::25 80]</span>
E<span class="token operator">:</span> 有几个软件包无法下载，要不运行 apt<span class="token operator">-</span>get update 或者加上 <span class="token operator">--</span>fix<span class="token operator">-</span>missing 的选项再试试？

</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br><span class="line-number">32</span><br><span class="line-number">33</span><br><span class="line-number">34</span><br><span class="line-number">35</span><br><span class="line-number">36</span><br><span class="line-number">37</span><br><span class="line-number">38</span><br><span class="line-number">39</span><br><span class="line-number">40</span><br><span class="line-number">41</span><br><span class="line-number">42</span><br><span class="line-number">43</span><br></div></div><ul><li><strong>然后我很莫名奇妙</strong></li> <li>为什么设置之后还是不行</li> <li>现在我知道了，是因为要<strong>重启</strong></li></ul> <h2 id="⭐️我的redhat系"><a href="#⭐️我的redhat系" class="header-anchor">#</a> ⭐️我的Redhat系</h2> <h3 id="_01-典型种类-2"><a href="#_01-典型种类-2" class="header-anchor">#</a> 01.典型种类</h3> <ul><li>Redhat</li> <li>CentOS</li></ul> <h3 id="_02-简易安装和包-2"><a href="#_02-简易安装和包-2" class="header-anchor">#</a> 02.简易安装和包</h3> <ul><li>Rpm包</li> <li>yum</li></ul> <h3 id="_03-centos的坑"><a href="#_03-centos的坑" class="header-anchor">#</a> 03.CentOS的坑</h3> <ul><li>CentOS系统有可能默认没有安装C语言帮助手册，man一个函数时会找不到帮助文件，用下面的命令安装：</li></ul> <p><code>yum install man-pages.noarch</code></p> <div class="language-txt line-numbers-mode"><pre class="language-text"><code>这样man open就可以了

但是
man mutex
No manual entry for mutex
原因是pthread
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br></div></div><h3 id="_04-yum『黄狗牌更新器』"><a href="#_04-yum『黄狗牌更新器』" class="header-anchor">#</a> 04.yum『黄狗牌更新器』</h3> <ul><li>yellow dog updater modified，“黄狗牌更新器，修订版”。</li></ul> <div class="language-txt line-numbers-mode"><pre class="language-text"><code>它的名字是yellow dog updater modified，怎么理解这几个英文单词呢？
我解释不清楚。或者可以翻译为“黄狗牌更新器，修订版”。
Linux程序员就是这么任性，给自己的作品取个古怪的名字，这样才能标新立异，特立独行，夺人眼球。
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br></div></div><h3 id="_05-光盘镜像"><a href="#_05-光盘镜像" class="header-anchor">#</a> 05.光盘镜像</h3> <h4 id="_5-1-i386-和amd64-的意思"><a href="#_5-1-i386-和amd64-的意思" class="header-anchor">#</a> 5.1.i386 和amd64 的意思</h4> <p>首先可以简化一个概念，i386=Intel 80386。其实i386通常被用来作为对Intel（英特尔）32位微处理器的统称。</p> <div class="language-txt line-numbers-mode"><pre class="language-text"><code>
      Windows NT类系统的安装盘上，通常i386是其根上的一个文件夹，里面包含了硬件所需的基本安装信息。
Windows2000和Windows XP的安装文件夹都是i386，正常情况下在安装光盘下可以找到这个文件夹。
为了加快安装速度，在安装前，安装程序会将i386拷贝到硬盘上。
这个文件夹也可以在将来系统发生变化（增减新的硬件）时安装驱动程序，或者增加系统附带的服务组件、软件时使用。

	在其它牵涉到处理器说明的地方，通常也可以使用i386这个称谓，其实和ppc作为Power PC微处理器的缩写是类似的。
	AMD64，又称“x86-64”或“x64”，是一种64位元的『电脑处理器架构』。
	它是建基于现有32位元的x86架构，由AMD公司所开发，应用AMD64指令集的自家产品有Athlon 64、Athlon 64 FX、Athlon 64 X2、Turion 64、Opteron及最新的Sempron处理器。
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br></div></div><h4 id="_5-2-查看当前电脑cpu架构"><a href="#_5-2-查看当前电脑cpu架构" class="header-anchor">#</a> 5.2.查看当前电脑CPU架构</h4> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>》》dpkg --printf-architecture
i386
》》uname -a
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br></div></div><h2 id="⭐️对比和使用"><a href="#⭐️对比和使用" class="header-anchor">#</a> ⭐️对比和使用</h2> <h3 id="_01-『笔记类』软件安装"><a href="#_01-『笔记类』软件安装" class="header-anchor">#</a> 01.『笔记类』软件安装</h3> <p><strong>注意</strong>：现在大多数公司的deb包，都<strong>只支持64位架构</strong>的，所以安装的32位架构的Debian系的，请找源码包安装</p> <ul><li>WPS for Linux的<a href="https://www.wps.com/linux" target="_blank" rel="noopener noreferrer">官网<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li> <li>Linux下的<a href="https://im.qq.com/linuxqq/download.html" target="_blank" rel="noopener noreferrer">QQ<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li> <li>Linux下的<a href="http://pan.baidu.com/download" target="_blank" rel="noopener noreferrer">百度网盘<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li> <li>Markdown编辑器<a href="https://support.typora.io/Typora-on-Linux/" target="_blank" rel="noopener noreferrer">Typora<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li> <li>Linux下的<a href="https://pinyin.sogou.com/linux/" target="_blank" rel="noopener noreferrer">搜狗输入法<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li> <li>Linux安装高亮优雅的<a href="https://www.sublimetext.com/3" target="_blank" rel="noopener noreferrer">sublime<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a>『源码包』、也可直接使用vim</li></ul> <h3 id="_02-deepin下使用『wine』使用windows下的软件"><a href="#_02-deepin下使用『wine』使用windows下的软件" class="header-anchor">#</a> 02.Deepin下使用『wine』使用Windows下的软件</h3> <p>Deepin下使用wine使用<a href="https://jingyan.baidu.com/article/47a29f24e608c780142399a9.html" target="_blank" rel="noopener noreferrer">Windows下的软件<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></p> <p>2020版本的，我使用的时候，有安装wine软件</p> <h3 id="_03-linux下java环境安装"><a href="#_03-linux下java环境安装" class="header-anchor">#</a> 03.Linux下java环境安装</h3> <ul><li>Redhat系列安装</li></ul> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token punctuation">[</span>root@VM-0-14-centos ~<span class="token punctuation">]</span><span class="token comment"># yum install java</span>

Complete<span class="token operator">!</span>

<span class="token punctuation">[</span>root@VM-0-14-centos ~<span class="token punctuation">]</span><span class="token comment"># java -v</span>
Unrecognized option: -v
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
<span class="token punctuation">[</span>root@VM-0-14-centos ~<span class="token punctuation">]</span><span class="token comment"># </span>

<span class="token punctuation">[</span>root@VM-0-14-centos ~<span class="token punctuation">]</span><span class="token comment"># java -version</span>
openjdk version <span class="token string">&quot;1.8.0_275&quot;</span>
OpenJDK Runtime Environment <span class="token punctuation">(</span>build <span class="token number">1.8</span>.0_275-b01<span class="token punctuation">)</span>
OpenJDK <span class="token number">64</span>-Bit Server VM <span class="token punctuation">(</span>build <span class="token number">25.275</span>-b01, mixed mode<span class="token punctuation">)</span>

</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br></div></div><p>解决办法：
1、判断机子是否安装了java环境。具体方法网上搜吧<br>
注意设置自己的环境变量：如JAVA_HOME,CLASSPATH,PATH<br>
2、有些程序会有内存设置，有些程序内存设置过大时，超过虚拟机的范围会报错。<br>
3、看下C:\Windows\System32生成的java.exe、javaw.exe、javaws.exe这个3个引起的；只要把这3个运行文件删除掉试试。<br>
4、在环境变量中显示定义参数来设置虚拟机大小。</p> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>		全局环境变量名: _JAVA_OPTIONS
		变量值: -Xmx512M
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br></div></div></div> <div class="page-edit"><!----> <!----></div> <!----> </div> <!----></div></div>
    <script src="/assets/js/app.c70e21ad.js" defer></script><script src="/assets/js/148.cfde1009.js" defer></script>
  </body>
</html>
